package com.cskaoyan.controller;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.vxcatalogvo.VXCatalogCurrentVO;
import com.cskaoyan.bean.vxcatalogvo.VXCatalogIndexVO;
import com.cskaoyan.service.wxcatalog.WXCatalogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 创建日期: 2022/05/08 20:48
 *
 * @author shuyang
 */
@RestController
@RequestMapping("wx/catalog")
public class CatalogWXController {
    @Autowired
    WXCatalogService wxCatalogService;

    @GetMapping("index")
    public BaseRespVo<VXCatalogIndexVO> queryCatalogIndexInVX() {
        VXCatalogIndexVO vxCatalogIndexVO = wxCatalogService.selectCatalogIndexInVX();
        return BaseRespVo.ok(vxCatalogIndexVO);
    }
    @GetMapping("current")
    public BaseRespVo<VXCatalogCurrentVO> queryCatalogCurrentInVX(Integer id){
        VXCatalogCurrentVO vxCatalogCurrentVO = wxCatalogService.selectCatalogCurrentInVX(id);
        return BaseRespVo.ok(vxCatalogCurrentVO);
    }

}
